<?php

namespace app\adminapi\validate;

use app\common\validate\BaseValidate;

class OperLogValidate extends BaseValidate
{
    protected $rule = [
        'pageNo' => 'regex:/^([1-9]\d*)$/',
        'pageSize' => ['regex'=>'/^(-1|[1-9]\d*)$/'],
        'operId' => 'require|number',
        'operIds' => 'require'
    ];

    protected $message = [
        'pageNo.regex' => '分页页码只能是数字',
        'pageSize.regex' => '分页页大小只能是数字',
        'operId.require' => '参数不完整',
        'operId.number' => '参数错误',
        'operIds.require' => '参数不完整'
    ];

    protected $scene = [
        'list' => ['pageNo', 'pageSize'],
        'delete' => ['operIds'],
        'query' => ['operId']
    ];
}